package cn.jzq.kotoba.modules.designpattern.factory;

/**
 * @author jzq
 * @date 2018/12/27 16:31
 */
public class NYPizzaStore extends PizzaStore2{


    @Override
    Pizza createPizza(String type) {
        Pizza pizza = null;
        if ("cheese".equals(type)) {
            pizza = new NyCheesePizza();
        } else if ("pepperoni".equals(type)) {
            pizza = new NYPepperoniPizza();
        }
        return pizza;
    }
}
